home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbexwait / execwait.frm < prev    next >
Text File  |  1995-05-08  |  1KB  |  47 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   7365
  8.    Height          =   4425
  9.    Left            =   1035
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4020
  13.    ScaleWidth      =   7365
  14.    Top             =   1140
  15.    Width           =   7485
  16. End
  17.  
  18. Sub Form_click ()
  19.   Print "Copying a file ..."
  20.   ShellAndWait ("\command.com /c copy \autoexec.bat \x.x")
  21.   
  22.   Kill ("\x.x")   'Note \x.x will not exist until
  23.                   'previous ShellAndWait has finished
  24.  
  25.   Print
  26.   Print "       ShellAndWait was written by: "
  27.   Print
  28.   Print "       Mike Caughran  [71034,2371]"
  29.   Print "       Cedar Island Software"
  30.   Print "       9018 Division St."
  31.   Print "       Juneau, Alaska 99801"
  32.   Print
  33.   Print
  34.   Print "       Be sure to download Cedar Island Link"
  35.   Print
  36.   Print "  A top quality com program which supports all major filetransfer protocols."
  37.   Print "  Cedar Island Link is in GO IBMCOM section 3 as CILINK.ZIP"
  38. End Sub
  39.  
  40. Sub ShellAndWait (CommandString$)
  41.   ID% = Shell(CommandString$, 3)
  42.   Do
  43.     X% = DoEvents()
  44.   Loop Until GetModuleUsage(ID%) = 0
  45. End Sub
  46.  
  47.